#pragma once


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "driver/spi_master.h"




#define PIN_NUM_MISO    -1
#define PIN_NUM_MOSI    26
#define PIN_NUM_CLK     27
#define PIN_NUM_CS      32
#define PIN_NUM_DC      33

#define LCD_HOST    HSPI
#define DMA_CHAN    2



#ifdef __cplusplus
extern "C" {
#endif


void SPI_Init(spi_device_handle_t spi,
                spi_host_device_t HOST_NUM,
                int MISO_NUM, int MOSI_NUM,
                int SCLK_NUM, int CS_NUM);
void SPI_Write_8bytes(spi_device_handle_t spi, const uint8_t data);
void SPI_Write_16bytes(spi_device_handle_t spi, const uint16_t data);
void SPI_Write_nbytes(spi_device_handle_t spi, const uint8_t *data, int len);






#ifdef __cplusplus
}
#endif
